-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: polish scripts (error handling, paths) #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
source "${ANSIBLE_PYTHON_ACTIVATE}" | ||
else | ||
echo "No Python activation script found at ${ANSIBLE_PYTHON_ACTIVATE}" | ||
return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Shouldn't we also return 0 if ANSIBLE_PYTHON_ACTIVATE was found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return 0 is implied, when the script rolls off the end without erroring or returning early
Description
This PR doesn't change the workflows at all, but makes small changes to the bash scripts for maintenance and consistency.
Changes:
activate_python.sh
) instead of in each script that needs it.paths.sh
) instead of in each script that needs them.paths.sh
, cd to the ansible root because this is the only directory where the ansible scripts work properly. This will let us effectively run the scripts from anywhere, which was previously intended but not possible.set -e
andtrap
Motivation and Context
And I wanted to fix all of these.
How Has This Been Tested?
Interactively from a fresh BSD install and from already set up test PLCs.
Where Has This Been Documented?
I'm not intending to add anything to the docs, this is business as usual but with edge case bugfixing.
Pre-merge checklist